package com.lanqiaofinal11;

/**
 * @author `RKC`
 * @date 2022/6/17 9:18
 */
public class A美丽的2 {

    public static void main(String[] args) {
        int ans = 0;
        for (int i = 1; i <= 2020; i++) {
            if (String.valueOf(i).contains("2")) {
                ans++;
            }
        }
        System.out.println(ans);
    }
}
